﻿
<%@ Page Language="C#" Theme="Default" MasterPageFile="~/MasterPages/admin.master" AutoEventWireup="true"  CodeFile="Ve.aspx.cs" Inherits="Ve" Title="Ve List" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">Danh sách vé</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1" PersistenceMethod="Session" />
		<br />
		<data:EntityGridView ID="GridView1" runat="server"			
				AutoGenerateColumns="False"					
				OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
				DataSourceID="VeDataSource"
				DataKeyNames="VeId"
				AllowMultiColumnSorting="False"
				DefaultSortColumnName="[TenVe]" 
				DefaultSortDirection="Ascending"	
				ExcelExportFileName="Export_Ve.xls" AllowExportToExcel="True" AllowSorting="True" EnableModelValidation="True" ExportToExcelText="Excel" PageSelectorPageSizeInterval="10" RecordsCount="0" ShowGridOnEmptyData="False"  		
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" ShowEditButton="True" EditText="Chỉnh sửa" SelectText="Chọn" UpdateText="Cập nhật" />				
				<asp:BoundField DataField="TenVe" HeaderText="Tên Vé" SortExpression="[TenVe]"  />
				<asp:BoundField DataField="MoTa" HeaderText="Mô Tả" SortExpression="[MoTa]"  />
				<asp:CheckBoxField DataField="TrangThai" HeaderText="Trạng Thái" SortExpression="[TrangThai]" />
				<data:HyperLinkField HeaderText="Loại Vé ID" DataNavigateUrlFormatString="LoaiveEdit.aspx?LoaiVeId={0}" DataNavigateUrlFields="LoaiVeId" DataContainer="LoaiVeIdSource" DataTextField="TenVe" />
				<data:HyperLinkField HeaderText="Rạp ID" DataNavigateUrlFormatString="RapEdit.aspx?RapId={0}" DataNavigateUrlFields="RapId" DataContainer="RapIdSource" DataTextField="TenRap" />
				<data:HyperLinkField HeaderText="Phòng ID" DataNavigateUrlFormatString="PhongEdit.aspx?PhongId={0}" DataNavigateUrlFields="PhongId" DataContainer="PhongIdSource" DataTextField="TenPhong" />
				<data:HyperLinkField HeaderText="Phim ID" DataNavigateUrlFormatString="PhimEdit.aspx?PhimId={0}" DataNavigateUrlFields="PhimId" DataContainer="PhimIdSource" DataTextField="TenPhim" />
				<data:HyperLinkField HeaderText="Ghế ID" DataNavigateUrlFormatString="GheEdit.aspx?GheId={0}" DataNavigateUrlFields="GheId" DataContainer="GheIdSource" DataTextField="TenGhe" />
				<asp:BoundField DataField="Gia" HeaderText="Giá Vé" SortExpression="[Gia]"  />
			</Columns>
			<EmptyDataTemplate>
				<b>No Ve Found!</b>
			</EmptyDataTemplate>
		</data:EntityGridView>
		<br />
		<asp:Button runat="server" ID="btnVe" OnClientClick="javascript:location.href='VeEdit.aspx'; return false;" Text="Thêm mới"></asp:Button>
		<data:VeDataSource ID="VeDataSource" runat="server"
			SelectMethod="GetPaged"
			EnablePaging="True"
			EnableSorting="True"
			EnableDeepLoad="True"
			>
			<DeepLoadProperties Method="IncludeChildren" Recursive="False">
	            <Types>
					<data:VeProperty Name="Ghe"/> 
					<data:VeProperty Name="Loaive"/> 
					<data:VeProperty Name="Phim"/> 
					<data:VeProperty Name="Phong"/> 
					<data:VeProperty Name="Rap"/> 
					<%--<data:VeProperty Name="LichSuGdkhCollection" />--%>
					<%--<data:VeProperty Name="UserIdUserCollection_From_LichSuGdkh" />--%>
				</Types>
			</DeepLoadProperties>
			<Parameters>
				<data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
				<asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex" Type="Int32" />
				<asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize" Type="Int32" />
				<data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
			</Parameters>
		</data:VeDataSource>
	    		
</asp:Content>



